-
Notifications
You must be signed in to change notification settings - Fork 10
feat: create metadata entries generator #272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Blocking this until #275 is merged. |
f6ba0c8
to
37a572d
Compare
@araujogui I saw there is a blocked label, could you elaborate what's blocked? |
The current linter relies on metadata entries, which are no longer easily available because it's now a generator. I’ve blocked this until #275 is merged, as it removes the linter's dependency on metadata. |
37a572d
to
2f6cf99
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #272 +/- ##
=======================================
Coverage 91.88% 91.88%
=======================================
Files 56 56
Lines 4142 4142
Branches 174 174
=======================================
Hits 3806 3806
Misses 334 334
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@nodejs/web-infra this is ready for reviews |
@@ -109,7 +109,7 @@ const createMetadata = slugger => { | |||
* The Navigation entries has a dedicated separate method for retrieval | |||
* as it can be manipulated outside of the scope of the generation of the content | |||
* | |||
* @param {import('vfile').VFile} apiDoc The API doc file being parsed | |||
* @param {{stem?: string, basename?: string}} apiDoc The API doc file being parsed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this still a VFile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it is but some properties like stem
and basename
are not enumerable in VFile, so I needed to serialize them before sending to worker threads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can create a PR on the VFile repo to mark these as enumerable, but I'm not sure if there are any drawbacks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, but let's see what others think, we should use the VFile type when possible, since we have it.
return { | ||
file: { | ||
stem: resolvedApiDoc.stem, | ||
basename: resolvedApiDoc.basename, | ||
}, | ||
tree: apiDocTree, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use VFile?
export interface ParserOutput<T> { | ||
file: { | ||
stem?: string; | ||
basename?: string; | ||
}; | ||
tree: T; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VFile?
Description
Creates metadata entries generator
Related Issues
Fixes #271
Check List
node --run test
and all tests passed.node --run format
&node --run lint
.